const mainRouter = [
  {path: '', redirect: 'gridview'},
  {
    path: 'gridview', component: () => import('@/views/MyGridView.vue'),
    meta: {role: ['admin'], title: '网格组件'}
  },
  {
    path: 'de', component: () => import('@/views/directive.vue'),
    meta: {role: ['teacher', 'admin'], title: '自定义指令'}
  },
  {
    path: 'Event', component: () => import('@/views/Event.vue'),
    meta: {
      title: '浏览器事件',
      role: ['admin', 'teacher']
    }
  },
  {
    path: 'permission', component: () => import('@/views/Permission.vue'),
    meta: {
      title: '按钮级别的权限',
      role: ['admin', 'teacher', 'viewer']
    }
  },
  {
    path: 'erupt', component: () => import('@/views/erupt.vue'),
    meta: {
      title: '高并发',
      role: ['admin', 'viewer']
    }
  },
  {
    path: 'request', component: () => import('@/views/Request.vue'),
    meta: {
      title: '再次请求,对上层无感',
      role: ['admin', 'viewer']
    }
  },

];


export default mainRouter
